# -*- coding: utf-8 -*-
# @Author   : niejiali
# @Time     : 2019/1/17 9:54
# @File     : decorator.py
# @Software : PyCharm
import time


class Redprint:
    def __init__(self, name):
        self.name = name

    def route(self, rule, **options):
        def derorator(f):
            print(rule, options)
            print(f.__name__)
            return f
        return derorator

Red = Redprint('name')


@Red.route('/book/get', method=['get', 'post'])
def f1():
    print("XX1")


f1()